package com.erik.lin.kafka;

import org.apache.kafka.common.serialization.Deserializer;

import java.util.Map;

/**
 * Created by Erik on 2017/9/20.
 */
public class DecodeingKafka implements Deserializer<Object> {
    @Override
    public void configure(Map<String, ?> map, boolean b) {

    }

    @Override
    public Object deserialize(String s, byte[] bytes) {
//        return SerializationUtils.deserialize(bytes);
        return new kafka.serializer.StringDecoder(null).fromBytes(bytes);
    }

    @Override
    public void close() {

    }
}
